// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addTreehole POST /api/treehole/add */
export async function addTreeholeUsingPost(
  body: API.TreeholeAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/treehole/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteTreehole POST /api/treehole/delete */
export async function deleteTreeholeUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/treehole/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** editTreehole POST /api/treehole/edit */
export async function editTreeholeUsingPost(
  body: API.TreeholeEditRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/treehole/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getTreeholeById GET /api/treehole/get */
export async function getTreeholeByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTreeholeByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTreehole_>('/api/treehole/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** getTreeholeVOById GET /api/treehole/get/vo */
export async function getTreeholeVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTreeholeVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTreeholeVO_>('/api/treehole/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** likeTreehole POST /api/treehole/like */
export async function likeTreeholeUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/treehole/like', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listTreeholeByPage POST /api/treehole/list/page */
export async function listTreeholeByPageUsingPost(
  body: API.TreeholeQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTreehole_>('/api/treehole/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listTreeholeVOByPage POST /api/treehole/list/page/vo */
export async function listTreeholeVoByPageUsingPost(
  body: API.TreeholeQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTreeholeVO_>('/api/treehole/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listReplyVOByPage POST /api/treehole/reply/list/page/vo */
export async function listReplyVoByPageUsingPost(
  body: API.TreeholeQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTreeholeVO_>('/api/treehole/reply/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
